package edu.washington.tcss360.burningpenguins.BPGUI;

import java.util.ArrayList;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

/**
 * Container class for the Header of the GUI.
 * 
 * @author Sean
 * @version 1
 * @since 11/20/2013
 */
public class BPHeader extends JMenuBar {

	/**
	 * Generated for serialization purposes.
	 */
	private static final long serialVersionUID = -7777655897025842304L;
	
	/**
	 * Default user role, only ability is to login.
	 */
	private static final int USER_ROLE = 0;

	/**
	 * The full list of available Menu items for populating the menu with.
	 */
	private final ArrayList<JMenuItem> MENU_ITEMS;

	/**
	 * The current role that is active.
	 */
	private int my_role;
	
	/**
	 * The actions available for the current role.
	 */
	private JMenu actionMenu;
	
	/**
	 * The roles available for the current user.
	 */
	private JMenu roleMenu;
	
	
	protected BPHeader() {
		this(USER_ROLE);
	}
	
	protected BPHeader(final int role) {
		super();
		this.my_role = role;
		this.MENU_ITEMS = new ArrayList<JMenuItem>();
		this.actionMenu = new JMenu("Actions");
		this.roleMenu = new JMenu("Roles");
		this.populateActions();
		this.populateRoles();
		this.mapActions();
		this.mapRoles();
		this.add(actionMenu);
		this.add(roleMenu);
	}
	
	private void populateActions() {
		
	}
	
	private void populateRoles() {
		
	}
	
	private void mapActions() {
		this.actionMenu.removeAll();
	}
	
	private void mapRoles() {
		this.roleMenu.removeAll();
	}
}
